import { ObjCreate } from "../common/ObjCreate";
import { Language } from "../../../../extend/language/Language";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
import { ImagesConst } from "../../resource/ImagesConst";
import { EPrictUnit } from "../../../../Message/Public/EPrictUnit";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
type int = number;
//class MyTeamBuyMoneyView
    
    export  class MyTeamBuyMoneyView /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            this.txt = ObjCreate.createTextField(Language.getString(85042), 0, 0, 160, 20, this, GlobalStyle.textFormat6, true);
            var loc1=new GTextFormat(FontUtil.xingkaiName, 18, GlobalStyle.color5Uint);
            loc1.letterSpacing = 2;
            this.yuanBao = ObjCreate.createBitmap(ImagesConst.Yuanbao_small, 126, 0, this);
            this.yuanBaoNum = ObjCreate.createTextField("333", 86, -3, 50, 20, this, loc1);
            return;
        }

        public updataMoney(arg1: int, arg2: int=2): void
        {
            if (arg1 != 0) 
            {
                this.txt.htmlText = Language.getString(85044);
                this.yuanBaoNum.text = "" + arg1;
                this.yuanBao.visible = loc1 = true;
                this.yuanBaoNum.visible = loc1;
                if (arg2 != EPrictUnit._EPriceUnitGold) 
                {
                    this.yuanBao.bitmapData = GlobalClass.getBitmapData(ImagesConst.Tongqian_small);
                }
                else 
                {
                    this.yuanBao.bitmapData = GlobalClass.getBitmapData(ImagesConst.Yuanbao_small);
                }
            }
            else 
            {
                this.txt.htmlText = Language.getString(85043);
                var loc1;
                this.yuanBao.visible = loc1 = false;
                this.yuanBaoNum.visible = loc1;
            }
            return;
        }

        /* internal */ /* var */txt: Object /* flash.text.TextField */;

        /* internal */ /* var */yuanBao: Object /* flash.display.Bitmap */;

        /* internal */ /* var */yuanBaoNum: Object /* flash.text.TextField */;
    }
